﻿$(document).ready(function () {

    var tabla = localStorage.getItem("tabla");
    var tabla2 = localStorage.getItem("tabla2");
    var tabla3 = localStorage.getItem("tabla3");
    var tabla4 = localStorage.getItem("tabla4");
    var tabla5 = localStorage.getItem("tabla5");
    var tabla6 = localStorage.getItem("tabla6");
    var nombre = localStorage.getItem("nombre");
    var fecha = new Date();

    $("#Tabla").html(tabla);
    $("#Tabla2").html(tabla2);
    $("#Tabla3").html(tabla3);
    $("#Tabla4").html(tabla4);
    $("#Tabla5").html(tabla5);
    $("#Tabla6").html(tabla6);
    document.getElementById("Nombre").innerHTML = nombre;
    document.getElementById("Fecha").innerHTML = fecha;

    fila = document.getElementById("reporteVentaComponente1").getElementsByTagName('tr');
    fila[0].getElementsByTagName('th')[0].style.display = 'none';
    for (i = 1; i < fila.length; i++)
        fila[i].getElementsByTagName('td')[0].style.display = 'none';

    fila = document.getElementById("reporteVentaComponente2").getElementsByTagName('tr');
    fila[0].getElementsByTagName('th')[0].style.display = 'none';
    for (i = 1; i < fila.length; i++)
        fila[i].getElementsByTagName('td')[0].style.display = 'none';

    fila = document.getElementById("reporteVenta").getElementsByTagName('tr');
    fila[0].getElementsByTagName('th')[0].style.display = 'none';
    for (i = 1; i < fila.length; i++)
        fila[i].getElementsByTagName('td')[0].style.display = 'none';

    fila = document.getElementById("reporteVenta2Componente1").getElementsByTagName('tr');
    fila[0].getElementsByTagName('th')[0].style.display = 'none';
    for (i = 1; i < fila.length; i++)
        fila[i].getElementsByTagName('td')[0].style.display = 'none';

    fila = document.getElementById("reporteVenta2Componente2").getElementsByTagName('tr');
    fila[0].getElementsByTagName('th')[0].style.display = 'none';
    for (i = 1; i < fila.length; i++)
        fila[i].getElementsByTagName('td')[0].style.display = 'none';

    fila = document.getElementById("reporte2Venta").getElementsByTagName('tr');
    fila[0].getElementsByTagName('th')[0].style.display = 'none';
    for (i = 1; i < fila.length; i++)
        fila[i].getElementsByTagName('td')[0].style.display = 'none';

    window.print();
    /*$("#Impresion").click(function () {
    $("#Impresion").hide();
    window.print();
    });*/

});